import SystemConstants from '../constant/system_constants.js'
// noinspection NpmUsedModulesInstalled,JSFileReferences
import BaseConstants from '@/constant/base_constants.js'

class UserUtils {
	static hasLogin() {
		let token = localStorage.getItem(SystemConstants.SYS_STORAGE_TOKEN_KEY)
		return token !== null
	}

	static storeAnimationLoaded() {
		sessionStorage.setItem(SystemConstants.SYS_ANIMATION_STATUS_KEY, 'true')
	}

	static hasLoadedAnimation() {
		let item = sessionStorage.getItem(SystemConstants.SYS_ANIMATION_STATUS_KEY)
		return BaseConstants.TRUE === item
	}
}

export default UserUtils